Skip to content
This repository was archived by the owner on Aug 27, 2024. It is now read-only.

Commit bf0fddd

Browse files
committed
Experimental: IMS
1 parent 01bcdb4 commit bf0fddd

File tree

13 files changed

+858
-56
lines changed

13 files changed

+858
-56
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/*
2+
* MIT License
3+
*
4+
* Copyright (c) 2022 Overrun Organization
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
package org.overrun.swgl.core.gl;
26+
27+
import org.jetbrains.annotations.Contract;
28+
29+
import static org.lwjgl.opengl.GL40.*;
30+
31+
/**
32+
* The OpenGL drawing modes.
33+
*
34+
* @author squid233
35+
* @since 0.1.0
36+
*/
37+
public enum GLDrawMode {
38+
POINTS(GL_POINTS, false),
39+
LINES(GL_LINES, false),
40+
LINE_LOOP(GL_LINE_LOOP, false),
41+
LINE_STRIP(GL_LINE_STRIP, false),
42+
TRIANGLES(GL_TRIANGLES, false),
43+
TRIANGLE_STRIP(GL_TRIANGLE_STRIP, false),
44+
TRIANGLE_FAN(GL_TRIANGLE_FAN, false),
45+
// QUADS(GL_QUADS, true),
46+
// QUAD_STRIP(GL_QUAD_STRIP, true),
47+
// POLYGON(GL_POLYGON, true),
48+
LINES_ADJACENCY(GL_LINES_ADJACENCY, false),
49+
LINE_STRIP_ADJACENCY(GL_LINE_STRIP_ADJACENCY, false),
50+
TRIANGLES_ADJACENCY(GL_TRIANGLES_ADJACENCY, false),
51+
TRIANGLE_STRIP_ADJACENCY(GL_TRIANGLE_STRIP_ADJACENCY, false),
52+
PATCHES(GL_PATCHES, false);
53+
54+
private final int glType;
55+
private final boolean isNotCore;
56+
57+
@Contract(pure = true)
58+
GLDrawMode(int glType, boolean isNotCore) {
59+
this.glType = glType;
60+
this.isNotCore = isNotCore;
61+
}
62+
63+
@Contract(pure = true)
64+
public int getGlType() {
65+
return glType;
66+
}
67+
68+
@Contract(pure = true)
69+
public boolean isNotCore() {
70+
return isNotCore;
71+
}
72+
}

0 commit comments

Comments
 (0)