Source code for picogl.backend.legacy.core.vertex.buffer.normal
import numpy as np
from OpenGL.GL import glNormalPointer
from OpenGL.raw.GL._types import GL_FLOAT
from picogl.backend.legacy.core.vertex.buffer.vertex import LegacyVBO
[docs]
class LegacyNormalVBO(LegacyVBO):
"""Specialized Class for Position Buffers"""
def __init__(self, handle: int = None, data: np.ndarray = None, size: int = 3, dtype: int = GL_FLOAT):
"""constructor"""
super().__init__(handle=handle, size=size, dtype=dtype)
if data is not None:
self.set_data(data)
self.bind()
[docs]
def configure(self):
"""Configure attributes specific to position atoms_buffers"""
glNormalPointer(GL_FLOAT, 0, None)