OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 { \ | 940 { \ |
941 makeContextCurrent(); gl##glname(a1,a2,a3,a4,a5,a6); \ | 941 makeContextCurrent(); gl##glname(a1,a2,a3,a4,a5,a6); \ |
942 } | 942 } |
943 | 943 |
944 #define GL_SAME_METHOD_8(glname, name, t1, t2, t3, t4, t5, t6, t7, t8) \ | 944 #define GL_SAME_METHOD_8(glname, name, t1, t2, t3, t4, t5, t6, t7, t8) \ |
945 void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8) \ | 945 void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8) \ |
946 { \ | 946 { \ |
947 makeContextCurrent(); gl##glname(a1,a2,a3,a4,a5,a6,a7,a8); \ | 947 makeContextCurrent(); gl##glname(a1,a2,a3,a4,a5,a6,a7,a8); \ |
948 } | 948 } |
949 | 949 |
| 950 PassOwnPtr<GraphicsContext3D> GraphicsContext3D::create() |
| 951 { |
| 952 PassOwnPtr<GraphicsContext3D> context = new GraphicsContext3D(); |
| 953 // FIXME: add error checking |
| 954 return context; |
| 955 } |
| 956 |
950 GraphicsContext3D::GraphicsContext3D() | 957 GraphicsContext3D::GraphicsContext3D() |
951 : m_currentWidth(0) | 958 : m_currentWidth(0) |
952 , m_currentHeight(0) | 959 , m_currentHeight(0) |
953 , m_internal(new GraphicsContext3DInternal()) | 960 , m_internal(new GraphicsContext3DInternal()) |
954 { | 961 { |
955 } | 962 } |
956 | 963 |
957 GraphicsContext3D::~GraphicsContext3D() | 964 GraphicsContext3D::~GraphicsContext3D() |
958 { | 965 { |
959 } | 966 } |
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2247 | 2254 |
2248 void GraphicsContext3D::viewport(long x, long y, unsigned long width, unsigned long height) | 2255 void GraphicsContext3D::viewport(long x, long y, unsigned long width, unsigned long height) |
2249 { | 2256 { |
2250 makeContextCurrent(); | 2257 makeContextCurrent(); |
2251 m_internal->viewportImpl(x, y, width, height); | 2258 m_internal->viewportImpl(x, y, width, height); |
2252 } | 2259 } |
2253 | 2260 |
2254 } | 2261 } |
2255 | 2262 |
2256 #endif // ENABLE(3D_CANVAS) | 2263 #endif // ENABLE(3D_CANVAS) |
OLD | NEW |