mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 08:05:28 +02:00
fixing the stars rendering that was vilently broken durign the hunt for GPUCOnfig.h includes
This commit is contained in:
parent
3c934af297
commit
269db0ff6f
2 changed files with 7 additions and 5 deletions
|
@ -141,6 +141,7 @@ void Stars::render(RenderArgs* renderArgs, float alpha) {
|
||||||
auto state = gpu::StatePointer(new gpu::State());
|
auto state = gpu::StatePointer(new gpu::State());
|
||||||
// enable decal blend
|
// enable decal blend
|
||||||
state->setDepthTest(gpu::State::DepthTest(false));
|
state->setDepthTest(gpu::State::DepthTest(false));
|
||||||
|
state->setAntialiasedLineEnable(true); // line smoothing also smooth points
|
||||||
state->setBlendFunction(true, gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::INV_SRC_ALPHA);
|
state->setBlendFunction(true, gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::INV_SRC_ALPHA);
|
||||||
_gridPipeline.reset(gpu::Pipeline::create(program, state));
|
_gridPipeline.reset(gpu::Pipeline::create(program, state));
|
||||||
}
|
}
|
||||||
|
@ -205,8 +206,6 @@ void Stars::render(RenderArgs* renderArgs, float alpha) {
|
||||||
batch._glUniform1f(_timeSlot, secs);
|
batch._glUniform1f(_timeSlot, secs);
|
||||||
geometryCache->renderUnitCube(batch);
|
geometryCache->renderUnitCube(batch);
|
||||||
|
|
||||||
//glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
|
|
||||||
|
|
||||||
static const size_t VERTEX_STRIDE = sizeof(StarVertex);
|
static const size_t VERTEX_STRIDE = sizeof(StarVertex);
|
||||||
size_t offset = offsetof(StarVertex, position);
|
size_t offset = offsetof(StarVertex, position);
|
||||||
gpu::BufferView posView(vertexBuffer, offset, vertexBuffer->getSize(), VERTEX_STRIDE, positionElement);
|
gpu::BufferView posView(vertexBuffer, offset, vertexBuffer->getSize(), VERTEX_STRIDE, positionElement);
|
||||||
|
@ -215,9 +214,6 @@ void Stars::render(RenderArgs* renderArgs, float alpha) {
|
||||||
|
|
||||||
// Render the stars
|
// Render the stars
|
||||||
batch.setPipeline(_starsPipeline);
|
batch.setPipeline(_starsPipeline);
|
||||||
//batch._glEnable(GL_PROGRAM_POINT_SIZE_EXT);
|
|
||||||
//batch._glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
|
|
||||||
//batch._glEnable(GL_POINT_SMOOTH);
|
|
||||||
|
|
||||||
batch.setInputFormat(streamFormat);
|
batch.setInputFormat(streamFormat);
|
||||||
batch.setInputBuffer(VERTICES_SLOT, posView);
|
batch.setInputBuffer(VERTICES_SLOT, posView);
|
||||||
|
|
|
@ -482,6 +482,12 @@ void GLBackend::syncPipelineStateCache() {
|
||||||
State::Data state;
|
State::Data state;
|
||||||
|
|
||||||
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
|
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
|
||||||
|
|
||||||
|
// Point size is always on
|
||||||
|
glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
|
||||||
|
glEnable(GL_PROGRAM_POINT_SIZE_EXT);
|
||||||
|
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
|
||||||
|
|
||||||
getCurrentGLState(state);
|
getCurrentGLState(state);
|
||||||
State::Signature signature = State::evalSignature(state);
|
State::Signature signature = State::evalSignature(state);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue