FS2_Open
Open source remastering of the Freespace 2 engine
gropengltnl.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 
13 #ifndef _GROPENGLTNL_H
14 #define _GROPENGLTNL_H
15 
16 
17 #include "globalincs/pstypes.h"
18 #include "graphics/gropengl.h"
19 #include "graphics/shadows.h"
20 #include "model/model.h"
21 
24 
25 class poly_list;
26 class vertex_buffer;
27 
28 extern float shadow_veryneardist;
29 extern float shadow_neardist;
30 extern float shadow_middist;
31 extern float shadow_fardist;
32 extern bool Rendering_to_shadow_map;
33 
34 void gr_opengl_start_instance_matrix(const vec3d *offset, const matrix *rotation);
35 void gr_opengl_start_instance_angles(const vec3d *pos, const angles *rotation);
37 void gr_opengl_set_projection_matrix(float fov, float aspect, float z_near, float z_far);
39 void gr_opengl_set_view_matrix(const vec3d *pos, const matrix *orient);
41 void gr_opengl_set_2d_matrix(/*int x, int y, int w, int h*/);
43 void gr_opengl_push_scale_matrix(const vec3d *scale_factor);
45 
48 
50 bool gr_opengl_pack_buffer(const int buffer_id, vertex_buffer *vb);
51 bool gr_opengl_config_buffer(const int buffer_id, vertex_buffer *vb, bool update_ibuffer_only);
53 void gr_opengl_set_buffer(int idx);
54 void gr_opengl_render_buffer(int start, const vertex_buffer *bufferp, int texi, int flags);
55 void gr_opengl_render_to_env(int FACE);
56 
57 void gr_opengl_update_buffer_object(int handle, uint size, void* data);
58 void opengl_delete_buffer_object(int handle);
59 
62 
64 void gr_opengl_render_stream_buffer(int buffer_handle, int offset, int n_verts, int flags);
65 
66 void gr_opengl_set_thrust_scale(float scale = -1.0f);
67 void gr_opengl_set_team_color(const team_color *colors);
68 
69 void opengl_tnl_init();
70 void opengl_tnl_shutdown();
71 
72 void opengl_tnl_set_material(int flags, uint shader_flags, int tmap_type);
75 
76 #endif //_GROPENGLTNL_H
void gr_opengl_start_clip_plane()
void gr_opengl_end_clip_plane()
void gr_opengl_start_instance_angles(const vec3d *pos, const angles *rotation)
void gr_opengl_end_instance_matrix()
float shadow_veryneardist
void opengl_tnl_init()
Definition: pstypes.h:88
void opengl_tnl_set_material_distortion(uint flags)
void gr_opengl_render_to_env(int FACE)
GLclampf f
Definition: Glext.h:7097
float shadow_fardist
void gr_opengl_render_stream_buffer(int buffer_handle, int offset, int n_verts, int flags)
hull_check orient
Definition: lua.cpp:5049
GLenum GLenum GLenum GLenum GLenum scale
Definition: Glext.h:8503
GLsizeiptr size
Definition: Glext.h:5496
float shadow_neardist
bool gr_opengl_pack_buffer(const int buffer_id, vertex_buffer *vb)
bool gr_opengl_config_buffer(const int buffer_id, vertex_buffer *vb, bool update_ibuffer_only)
void gr_opengl_end_projection_matrix()
void gr_opengl_set_projection_matrix(float fov, float aspect, float z_near, float z_far)
GLintptr offset
Definition: Glext.h:5497
void gr_opengl_set_thrust_scale(float scale=-1.0f)
unsigned int uint
Definition: pstypes.h:64
void opengl_delete_buffer_object(int handle)
int gr_opengl_create_buffer()
void opengl_tnl_shutdown()
void gr_opengl_set_2d_matrix()
void opengl_tnl_set_material(int flags, uint shader_flags, int tmap_type)
void gr_opengl_render_buffer(int start, const vertex_buffer *bufferp, int texi, int flags)
int idx
Definition: multiui.cpp:761
void gr_opengl_end_2d_matrix()
void gr_opengl_update_transform_buffer(void *data, uint size)
void gr_opengl_set_transform_buffer_offset(int offset)
void opengl_tnl_set_material_soft_particle(uint flags)
void gr_opengl_set_view_matrix(const vec3d *pos, const matrix *orient)
GLint GL_max_elements_indices
Definition: gropengltnl.cpp:75
GLuint start
Definition: Gl.h:1502
GLbitfield flags
Definition: Glext.h:6722
Definition: 2d.h:109
bool Rendering_to_shadow_map
Definition: gropengltnl.cpp:88
float shadow_middist
void gr_opengl_destroy_buffer(int idx)
void gr_opengl_set_team_color(const team_color *colors)
int gr_opengl_create_stream_buffer_object()
void gr_opengl_set_buffer(int idx)
GLenum GLsizei GLenum GLenum const GLvoid * data
Definition: Gl.h:1509
Definition: 2d.h:129
hull_check pos
Definition: lua.cpp:5050
float fov
Definition: lua.cpp:9155
void gr_opengl_start_instance_matrix(const vec3d *offset, const matrix *rotation)
void gr_opengl_update_buffer_object(int handle, uint size, void *data)
void gr_opengl_end_view_matrix()
GLint GL_max_elements_vertices
Definition: gropengltnl.cpp:74
void gr_opengl_push_scale_matrix(const vec3d *scale_factor)
int GLint
Definition: Gl.h:48
void gr_opengl_pop_scale_matrix()